<template>
    <div id="my-header">
        <span v-show="$store.state.user.nikeName != ''">昵称：{{$store.state.user.nikeName}}</span>
        <slot></slot>
    </div>
</template>

<style scoped lang="scss">
    #my-header {
        width: 100%;
        height: 70px;
        background-color: yellowgreen;
        text-align: center;
        position: relative;
        line-height: 70px;
        font-size: 20px;
        span {
            position: absolute;
            left: 10px;
            top: 0
        }
    }
</style>